﻿using BCCommon;
using BCCommon.Enums;
using BCDto.Common.Remark;
using BCDto.Sim.Admin.Admin;
using BCDto.TMS.Agent.AgentRecord;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCService.TMS.Agent.AgentRecord
{
    /// <summary>
    /// 代理商信息
    /// </summary>
    public interface IAgentRecordService
    {
        /// <summary>
        /// 添加代理商信息
        /// </summary>
        /// <param name="admin">管理员信息</param>
        /// <param name="requestDto">代理商信息</param>
        /// <returns></returns>
        AgentRecordDto Add(AdminDto admin, AgentRecordRequestDto requestDto);

        /// <summary>
        /// 更新代理商信息
        /// </summary>
        /// <param name="admin">管理员信息</param>
        /// <param name="agentRecordId">代理商记录Id</param>
        /// <param name="putDto">代理商信息</param>
        /// <returns></returns>
        AgentRecordDto Update(AdminDto admin, long agentRecordId, AgentRecordPutDto putDto);

        /// <summary>
        /// 删除代理商信息
        /// </summary>
        /// <param name="admin">管理员信息</param>
        /// <param name="agentRecordId">代理商记录Id</param>
        /// <param name="remarkRequestDto">备注信息</param>
        void Delete(AdminDto admin, long agentRecordId, RemarkRequestDto remarkRequestDto);
        /// <summary>
        /// 获取代理商信息
        /// </summary>
        /// <param name="adminDto">管理员信息</param>
        /// <returns></returns>
        AgentRecordDto Get(AdminDto adminDto);
        /// <summary>
        /// 获取代理商信息
        /// </summary>
        /// <param name="agentRecordId">代理商Id</param>
        /// <returns></returns>
        AgentRecordDto Get(long agentRecordId);
        /// <summary>
        /// 获取代理商信息
        /// </summary>
        /// <param name="admin">管理员信息</param>
        /// <param name="companyId">公司Id</param>
        /// <param name="parentCompanyId">父级公司Id</param>
        /// <param name="agentLevel">代理商级别</param>
        /// <param name="isDelete">是否已删除</param>
        /// <param name="createStartDate">创建开始日期</param>
        /// <param name="createEndDate">创建结束日期</param>
        /// <param name="businessType">公司业务类型</param>
        /// <param name="companyName">公司名称</param>
        /// <param name="pageIndex">页号</param>
        /// <param name="pageSize">每页数据条数</param>
        PageableList<AgentRecordViewDto> Query(AdminDto admin, int? companyId, int? parentCompanyId, int? agentLevel, bool? isDelete, DateTime? createStartDate, DateTime? createEndDate, CompanyBusinessType? businessType, string companyName, int pageIndex, int pageSize);
        /// <returns></returns>

        /// <summary>
        /// 根据公司ID获取代理商信息
        /// </summary>
        /// <param name="companyId">公司Id</param>
        /// <returns></returns>
        AgentRecordDto GetByCompanyId(int companyId);

        /// <summary>
        /// 修改代理商手动指派信息
        /// </summary>
        /// <param name="admin">管理员信息</param>
        /// <param name="agentRecordId">代理商记录Id</param>
        /// <param name="putDto">代理商手动指派信息</param>
        /// <returns></returns>
        AgentRecordDto UpdateManualAssign(AdminDto admin, long agentRecordId, AgentRecordManualAssignDto putDto);
        /// <summary>
        /// 获取代理商视图信息
        /// </summary>
        /// <param name="agentRecordId">代理商记录Id</param>
        /// <returns></returns>
        AgentRecordViewDto GetViewByAgentRecordId(long agentRecordId);

        /// <summary>
        /// 获取代理商信息
        /// </summary>
        /// <param name="agentRecordId">代理商记录Id</param>
        /// <returns></returns>
        AgentRecordDto GetById(long agentRecordId);
    }
}
